home *** CD-ROM | disk | FTP | other *** search
/ The Games Machine 76 / XENIATGM66.iso / Indiana Jones / Indiana Jones.exe / RESOURCE / PREVIEW.GOB / cog_aet_usedilatorsmall.cog < prev    next >
Text File  |  1999-11-15  |  4KB  |  158 lines

  1. # Jones 3D Cog Script
  2. #
  3. # aet_UseDilatorSmall.cog
  4. #
  5. # [TL]
  6. #
  7. # This cog is used to control the opening of, and saylines surrounding, the "small" membrane doors
  8. # for the P.O.R.s for the SOL jewels.  
  9. #
  10. # (C) 1999 LucasArts Entertainment Co. All Rights Reserved
  11. # ========================================================================================
  12. symbols
  13.     
  14. message     startup
  15. message     damaged
  16. message        activated
  17. message        crossed
  18.  
  19. surface     mem                            mask=0x408    # No move adjoin.
  20.  
  21. thing        mem3do                                    # 3do membrane-no collide.    
  22. thing        player                        local
  23. thing        memfake                     mask=0x408
  24.  
  25. sound        fade=aet_por_open.wav        local
  26. sound        gizmo=AT03J01.WAV            local        # Line once he uses the Imp5 to open membrane.
  27. sound        barrier=AT03J02.WAV            local        # Line for when Indy first activates membrane.
  28. sound        better=AT03J03.WAV            local        # Line once he crosses into the POR.
  29.  
  30. int            done=0                        local        # Int to tell the cog when the membrane is open for good.
  31.  
  32. cog            aetDoorTalk                                # Aetherium doortalk cog for different lines.
  33.  
  34. end
  35.  
  36. # ========================================================================================
  37. code
  38.  
  39. startup:
  40.  
  41. player = GetLocalPlayerThing();
  42. global1 = 0;    
  43. global2 = 0;
  44. global3 = 0;
  45.  
  46. return;
  47.     
  48. # ........................................................................................
  49. activated:
  50.  
  51. # If Indy activates the membrane with nothing in hand.
  52. if ((GetSenderRef() == memfake) && (GetSourceRef() == player) && (GetCurWeapon(player) == 0) || (GetCurWeapon(player) != 18))
  53.     {
  54.     if (global1 == 0)
  55.         {
  56.         global1 = 1;
  57.         # Begin small cutscene.
  58.         MakeMeStop();
  59.         DeselectWeaponWait(player);    
  60.         StartCutscene(0);
  61.         # Camera offset.
  62.         PlayMode(player, 60, 0);
  63.         # "Well now!  From this side, the barrier between worlds..."
  64.         PlayVoice(player, barrier, 1.0, 1);
  65.         # Return to normal.
  66.         ResetThing(player);
  67.         ClearActorFlags(player, 0x200000);
  68.         EndCutScene();
  69.         return;
  70.         }
  71.     if (global1 != 0)
  72.         {
  73.         # Begin small cutscene.
  74.         MakeMeStop();
  75.         DeselectWeaponWait(player);    
  76.         StartCutscene(0);
  77.         # Camera offset.
  78.         PlayMode(player, 60, 0);
  79.         SendMessageEx(aetDoorTalk, user3, player, 0, 0, 0);
  80.         while (global15 == 0)
  81.             {
  82.             #Wait for line to finish...
  83.             Sleep(0.01);
  84.             }
  85.         # Return to normal.
  86.         ResetThing(player);
  87.         ClearActorFlags(player, 0x200000);
  88.         EndCutScene();
  89.         }
  90.     }
  91.  
  92. return;
  93.  
  94. # ........................................................................................
  95. damaged:
  96.  
  97. # Code for when Imp5 is used on no move adjoin.
  98. if ((GetSenderRef() == memfake) && (GetParam(1) == 0x5000) && (done == 0))
  99. {
  100.     done = 1;
  101.     # Begin small cutscene.
  102.     DestroyThing(memfake);
  103.     StartCutscene(0);
  104.     MakeMeStop();
  105.     //DeselectWeaponWait(player);    
  106.     # Fade out mem 3do.
  107.     ThingFadeAnim(mem3do, 1, 0, 3.0, 0);
  108.     PlaySoundLocal(fade, 1.0, 0, 0x0000, 0);
  109.     Sleep(3.1);
  110.     # Check to see if this line already played.
  111.     if (global2 == 0)
  112.         {
  113.         # "Well Now!  This gizmo seems to open..."
  114.         PlayVoice(player, gizmo, 1.0, 1);
  115.         global3 = 1;
  116.         }
  117.     if (global2 == 1)
  118.         {
  119.         # Code for using aet_DoorTalk.cog.
  120.         SendMessageEx(aetDoorTalk, user1, player, 0, 0, 0);
  121.         while (global15 == 0)
  122.             {
  123.             #Wait for line to finish...
  124.             Sleep(0.01);
  125.             }
  126.         }
  127.     global2 = 1;
  128.     # Destroy no longer needed membrane 3do.
  129.     DestroyThing(mem3do);
  130.     # Set no move adjoin to "move".
  131.     SetAdjoinFlags(mem, 2);
  132.     # Return to normal.
  133.     ClearActorFlags(player, 0x200000);
  134.     EndCutScene();
  135. }
  136.  
  137. return;
  138.  
  139. # ........................................................................................
  140. crossed:
  141.  
  142. # Code for entering a P.O.R. for the first time and playing the right line.
  143. if (GetSenderRef() == mem)
  144.     {
  145.     if (global3 == 1)
  146.         {
  147.         global3 = 2;
  148.         # "...and I feel better already!"
  149.         PlayVoice(player, better, 1.0, 0);
  150.         }
  151.     }
  152.  
  153. return;
  154.  
  155. # ........................................................................................
  156. end
  157.  
  158.